<script language="javascript">
function showProductWindow(id)
{
    window.open("/product/product_info/"+id,"_blank","height=500,width=700,top=300,left=400,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no");
}
function showAgentWindow(id)
{
    window.open("/other_org/agent_info/"+id,"_blank","height=500,width=500,top=300,left=400,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no");
}
</script>
<h1>订单管理 - <span id="secondHeading">检查条形码</span></h1>
已生成<%=@codes.length%>个条形码
<TABLE border="0" id="LIST_TB">
	<TR>
		<TD>产品名</TD>
		<TD>客户</TD>
		<TD>销售日期</TD>
		<TD>条形码</TD>
	<TR>
	<%@codes.each do |code|%>
	<TR>
		<TD><a href="javascript:showProductWindow(<%=code.product.id%>)"><%=code.product.name%></a></TD>
		<TD><a href="javascript:showAgentWindow(<%=@agentId%>)"><%=@agent%></a></TD>
		<TD><%=code.out_date_at%></TD>
		<TD><%=code.prefix+code.code+code.postfix%></TD>
	<TR>
	<%end%>
</TABLE>
